using System;
using System.Collections.Generic;
using System.Text;
using Cores;
using System.Data;
using System.Data.SqlClient;

namespace DAOLayer
{
    public class DatVeDao
    {
        private Connection _conn;

        public Connection Conn
        {
            get { return _conn; }
            set { _conn = value; }
        }
        public DatVeDao()
        {
            Conn = new Connection();
            if (Conn.Connect().State == ConnectionState.Closed)
            {
                Conn.ConnObj.Open();
            }
        }
        ~DatVeDao()
        {
            return;
        }
        public void Xoa(int MaVe, int MaKH)
        {
            SqlCommand cmd = new SqlCommand("spXoaVe", Conn.ConnObj);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaVe", MaVe);
            cmd.Parameters.AddWithValue("@MaKH", MaKH);
            cmd.ExecuteNonQuery();
        }
    }
}
